import getLink from "../../apis/getapi"
export let Purchase={
    state:{
        arr:[],
        arr1:[],
        arr2:[],
        map:[]
    },
    mutations:{
        Purchasetext(state,payload){
            state.arr = payload
        },
        Recommendtext(state,payload){
            state.arr1 = payload
        },
        Purchasemaps(state,payload){
            state.map = payload
        },
    },
    actions:{
        getapione(context,payload){
            getLink(payload.url).then((ok)=>{
                
                context.commit("Purchasetext",ok.data.Purchase)
            })
        },
        getapitwo(context,payload){
            getLink(payload.url).then((ok)=>{
                
                context.commit("Recommendtext",ok.data.Recommend)
            })
        },
        Purchasemap(context,payload){
            getLink(payload.url).then((ok)=>{
                
                context.commit("Purchasemaps",ok.data.map)
            })
        },
       
    },
    getters:{

    }
}